home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / easyrcs_1.3 / arexx / cleanfiles.ercs next >
Text File  |  1996-09-09  |  934b  |  47 lines

  1. /*  CleanFiles.ercs
  2.  *    Yann Muller © 1996
  3.  *    Version 1.0   ---  03/09/96
  4.  */
  5.  
  6. OPTIONS RESULTS
  7. OPTIONS FAILAT 11
  8. ADDRESS EASYRCS
  9.  
  10. NL = '0A'X
  11.  
  12. 'confirmreq' 'Really clean unmodified files?'
  13.  
  14. if (RC == 0) then
  15. do
  16.     'query showstate'
  17.     show_old = RESULT
  18.     'show out'
  19.     'select top'
  20.  
  21.     do while (RC == 0)
  22.         /* verify each file */
  23.         'query filename'
  24.         file = RESULT
  25.         address command 'rcs:rcsdiff -q' file '>NIL:'
  26.         if (RC == 0) then do
  27.             'select next'
  28.             if (RC == 0) then do
  29.                 'query filename'
  30.                 file = RESULT
  31.                 'select prev'
  32.                 'cancelco force'
  33.                 'select FILE' file
  34.                 end
  35.             else do
  36.                 'cancelco force'
  37.                 'select next'
  38.                 end
  39.             end
  40.         else do
  41.             'select next'
  42.             end
  43.         end
  44.  
  45.     'show' show_old
  46.     end
  47.